/*
 * @Author: your name
 * @Date: 2020-12-23 18:05:05
 * @LastEditTime: 2020-12-23 18:06:18
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \jijian改\modules\error\index.js
 */
// index.js
const path = require('path')

module.exports = function ProductCatalogModule(moduleOptions) {
  this.extendRoutes((routes) => {
    routes.unshift(
      {
        name: 'error-404',
        path: '/error/404',
        component: path.resolve(__dirname, 'pages/404'),
      },
      {
        name: 'error-500',
        path: '/error/500',
        component: path.resolve(__dirname, 'pages/500'),
      },
      {
        name: 'error',
        path: '*',
        redirect: '/error/404',
      }
    )
  })
  // we can't register stores through Nuxt modules so we have to make a plugin
  // this.addPlugin(path.resolve(__dirname, 'plugins/add-stores.js'))
}
